package com.gnerv.sylvanas.authentication.security.controller;

import com.gnerv.sylvanas.framework.common.model.RestResult;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
@RequestMapping(value = "/api")
public class AuthController {

    @PostMapping(value = "login")
    public RestResult<Void> login(@RequestParam(value = "username") String username,
                                  @RequestParam(value = "password") String password) {
        return RestResult.ok();
    }

    @GetMapping(value = "logout")
    public RestResult<Void> logout() {
        return RestResult.ok();
    }

}
